{% extends 'Base/main.content.lists.div.html.twig' %}
{% import 'Base/list_item.twig' as listItem %}
{#{% block addBtn %}{% endblock %}#}
{% block delBtn %}{% endblock %}
{% block options %}
    <div class="menu-list">
        {#{{ dump(tools) }}#}
        {% for key , classes in tools %}
            {% set default = "请选择分类" %}
            {% set classes = classes %}
            <div class="layui-inline">
                <select name="cond[{{ key }}]" onchange="javascript:__doPostBack('searchCond','')" >
                    <option value="" {{app.request.get("cond")[key] is defined and app.request.get("cond")[key] == "" ? ' selected="selected"' : "" }} >{{ default }}</option>
                    {% for class in classes %}
                        <option
                                value="{{ class.id }}"
                                {{app.request.get("cond")[key] is defined and  app.request.get("cond")[key] == class.id ? ' selected="selected"' : "" }}
                                >{{ class.name }}</option>
                    {% endfor %}
                </select>
            </div>
        {% endfor %}
    </div>
{% endblock %}
{% block tableHead %}
    <tr>
        {#<th width="3%">选择</th>#}
        <th align="left" width="10%">ID</th>
        <th align="left" width="10%">关键词</th>
        <th align="left" width="15%">回复语</th>
        <th align="left" width="15%">启用状态</th>
        <th align="right" width="10%"></th>
    </tr>
{% endblock %}
{% block tableList %}
    {#{{ dump(lists) }}#}
    {% for Entity in lists %}
        <tr>
            {#<td align="center">#}
                {#<span class="checkall" style="vertical-align:middle;">#}
                    {#<input lay-skin="primary" type="checkbox" name="ids[]" value="{{ Entity.WechatReply_id }}"/>#}
                {#</span>#}
            {#</td>#}

            <td align="left">
                {{ Entity.WechatReply_id }}
            </td>
            <td align="left">
                {{ listItem.editVal('find',Entity.WechatReply_find,Entity.WechatReply_id) }}
            </td>
            <td align="left">
                {{ listItem.editVal('reply',Entity.WechatReply_reply,Entity.WechatReply_id) }}
            </td>
            <td align="left">
                {{ listItem.switch('status',Entity.WechatReply_status,Entity.WechatReply_id) }}
            </td>

            <td align="right">
                <a href="{{ path("WechatReplyPreEdit",{'id':Entity.WechatReply_id}) }}" class="layui-btn layui-btn-normal layui-btn-sm"><span class="fa fa-edit c13"></span></a>
            </td>
        </tr>
    {% endfor %}
{% endblock %}
{% block script %}
{% endblock %}

